Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the InterfaceManager class to register other InterfaceManagers. #220

Conversation

toliver
Copy link
Contributor

@toliver toliver commented Nov 30, 2015

This will make it possible to combine several RobotHW objects into a single one.

This PR contains the part of #138 that deals with combining interface_managers. (Also partially related to issues discussed in #75 and #151).

To deal with the memory leak mentioned here, I've used a boost::ptr_vector<ResourceManagerBase> that will deal with the destruction of any combined ResourceManager when the InterfaceManager is destroyed.

This approach allows us to keep the signature of T* get() (not breaking compatibility) but still address the issues that @kphawkins expressed here. This means that any pointer returned by T* get() would stay valid until the InterfaceManager is destroyed, even if a subsequent call to T* get() for the same interface T has generated a new combined interface object. In this case, the user of the old pointer would simply have a shorter list of resources available.

This will make it possible to combine several RobotHW objects into a single one.
This was referenced May 6, 2016
@toliver
Copy link
Contributor Author

toliver commented May 6, 2016

Reopen against kinetic-devel as #235

@toliver toliver closed this May 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant